package com.muyu.system.mapper;

import com.muyu.system.domain.DanmoShoppingProducts;
import com.muyu.system.domain.DanmoShoppingProductsCollection;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 商品收藏Mapper接口
 *
 * @author yangle
 * @date 2024-10-09
 */
public interface DanmoShoppingProductsCollectionMapper
{
    /**
     * 查询商品收藏
     *
     * @param id 商品收藏主键
     * @return 商品收藏
     */
    public DanmoShoppingProductsCollection selectDanmoShoppingProductsCollectionById(Long id);

    /**
     * 查询商品收藏列表
     *
     * @param danmoShoppingProductsCollection 商品收藏
     * @return 商品收藏集合
     */
    public List<DanmoShoppingProductsCollection> selectDanmoShoppingProductsCollectionList(DanmoShoppingProductsCollection danmoShoppingProductsCollection);

    /**
     * 新增商品收藏
     *
     * @param danmoShoppingProductsCollection 商品收藏
     * @return 结果
     */
    public int insertDanmoShoppingProductsCollection(DanmoShoppingProductsCollection danmoShoppingProductsCollection);

    /**
     * 修改商品收藏
     *
     * @param danmoShoppingProductsCollection 商品收藏
     * @return 结果
     */
    public int updateDanmoShoppingProductsCollection(DanmoShoppingProductsCollection danmoShoppingProductsCollection);

    /**
     * 删除商品收藏
     *
     * @param id 商品收藏主键
     * @return 结果
     */
    public int deleteDanmoShoppingProductsCollectionById(Long id);

    /**
     * 批量删除商品收藏
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteDanmoShoppingProductsCollectionByIds(Long[] ids);

    /**
     * 批量删除商品
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteDanmoShoppingProductsByIds(Long[] ids);

    /**
     * 批量新增商品
     *
     * @param danmoShoppingProductsList 商品列表
     * @return 结果
     */
    public int batchDanmoShoppingProducts(List<DanmoShoppingProducts> danmoShoppingProductsList);


    /**
     * 通过商品收藏主键删除商品信息
     *
     * @param id 商品收藏ID
     * @return 结果
     */
    public int deleteDanmoShoppingProductsById(Long id);

    DanmoShoppingProductsCollection selectDanmoShoppingProductsCollectionLists(DanmoShoppingProductsCollection danmoShoppingProductsCollection);

    void addCollection(DanmoShoppingProductsCollection danmoShoppingProductsCollection);

    /**
     * 查询商品收藏
     * @param productId
     * @return
     */
    DanmoShoppingProductsCollection selectDanmoShoppingProductsCollectionByProductsId(@Param("productId") Long productId);

    Long selectCollectionCountByGoodsId(Long goodsId);

    int deleteDanmoShoppingProducts(DanmoShoppingProductsCollection danmoShoppingProductsCollection);
}
